home *** CD-ROM | disk | FTP | other *** search
/ Linux Programs 1995 Summer / Linux Programs.iso / ghostscr / gs_2.6 / gs_2 / usr / bin / ps2ascii < prev    next >
Text File  |  1994-05-09  |  563b  |  14 lines

  1. #!/bin/sh -f
  2. # Extract ASCII text from a PostScript file.  Usage:
  3. #    ps2ascii [infile.ps [outfile.txt]]
  4. # If outfile is omitted, output goes to stdout.
  5. # If both infile and outfile are omitted, ps2ascii acts as a filter,
  6. # reading from stdin and writing on stdout.
  7. if ( test $# -eq 0 ) then
  8.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps
  9. elif ( test $# -eq 1 ) then
  10.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps
  11. else
  12.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2
  13. fi
  14.